// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  gicr_lpi_regs_c_union_define.h
// Project line  :  Platform And Key Technologies Development
// Department    :  CAD Development Department
// Author        :  xxx
// Version       :  1
// Date          :  2013/3/10
// Description   :  The description of xxx project
// Others        :  Generated automatically by nManager V4.2 
// History       :  xxx 2018/05/11 14:50:31 Create file
// ******************************************************************************

#ifndef __GICR_LPI_REGS_C_UNION_DEFINE_H__
#define __GICR_LPI_REGS_C_UNION_DEFINE_H__

/* Define the union U_GICR_CTLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_ctlr_uwp        : 1  ; /* [31] */
        unsigned int    rsv_0                : 5  ; /* [30:26] */
        unsigned int    gicr_ctlr_dpg1       : 1  ; /* [25] */
        unsigned int    gicr_ctlr_dpg0       : 1  ; /* [24] */
        unsigned int    rsv_1                : 20  ; /* [23:4] */
        unsigned int    gicr_ctlr_rwp        : 1  ; /* [3] */
        unsigned int    rsv_2                : 1  ; /* [2] */
        unsigned int    rsv_3                : 1  ; /* [1] */
        unsigned int    gicr_ctlr_enablelpis : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CTLR;

/* Define the union U_GICR_IIDR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_iidr_version : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_IIDR;

/* Define the union U_GICR_TYPER_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_4                : 6  ; /* [31:26] */
        unsigned int    commonlpiaff         : 2  ; /* [25:24] */
        unsigned int    gicr_typer_procnum   : 16  ; /* [23:8] */
        unsigned int    rsv_5                : 2  ; /* [7:6] */
        unsigned int    gicr_typer_dpgs      : 1  ; /* [5] */
        unsigned int    gicr_typer_last      : 1  ; /* [4] */
        unsigned int    gicr_typer_directlpi : 1  ; /* [3] */
        unsigned int    rsv_6                : 1  ; /* [2] */
        unsigned int    gicr_typer_vlpis     : 1  ; /* [1] */
        unsigned int    gicr_typer_lpis      : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_TYPER_L;

/* Define the union U_GICR_TYPER_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_typer_a3 : 8  ; /* [31:24] */
        unsigned int    gicr_typer_a2 : 8  ; /* [23:16] */
        unsigned int    gicr_typer_a1 : 8  ; /* [15:8] */
        unsigned int    gicr_typer_a0 : 8  ; /* [7:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_TYPER_H;

/* Define the union U_GICR_STATUSR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_7            : 28  ; /* [31:4] */
        unsigned int    gicr_status_word : 1  ; /* [3] */
        unsigned int    gicr_status_rwod : 1  ; /* [2] */
        unsigned int    gicr_status_wrd  : 1  ; /* [1] */
        unsigned int    gicr_status_rrd  : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_STATUSR;

/* Define the union U_GICR_WAKER */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_waker_quiescent      : 1  ; /* [31] */
        unsigned int    rsv_8                     : 28  ; /* [30:3] */
        unsigned int    gicr_waker_childrenasleep : 1  ; /* [2] */
        unsigned int    gicr_waker_processorsleep : 1  ; /* [1] */
        unsigned int    gicr_waker_sleep          : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_WAKER;

/* Define the union U_GICR_SETLPIR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_setlpi_pid : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_SETLPIR_L;

/* Define the union U_GICR_SETLPIR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_9 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_SETLPIR_H;

/* Define the union U_GICR_CLRLPIRR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_clrlpi_pid : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CLRLPIRR_L;

/* Define the union U_GICR_CLRLPIR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_10 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CLRLPIR_H;

/* Define the union U_GICR_PROPBASER_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_probaser_l      : 20  ; /* [31:12] */
        unsigned int    gicr_proshareability : 2  ; /* [11:10] */
        unsigned int    gicr_procacheability : 3  ; /* [9:7] */
        unsigned int    rsv_11               : 2  ; /* [6:5] */
        unsigned int    gicr_proidbits       : 5  ; /* [4:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PROPBASER_L;

/* Define the union U_GICR_PROPBASER_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_12          : 16  ; /* [31:16] */
        unsigned int    gicr_probaser_h : 16  ; /* [15:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PROPBASER_H;

/* Define the union U_GICR_PENDBASER_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_pendbaser_l      : 16  ; /* [31:16] */
        unsigned int    rsv_13                : 4  ; /* [15:12] */
        unsigned int    gicr_pendshareability : 2  ; /* [11:10] */
        unsigned int    gicr_pendcacheability : 3  ; /* [9:7] */
        unsigned int    rsv_14                : 7  ; /* [6:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PENDBASER_L;

/* Define the union U_GICR_PENDBASER_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_15             : 1  ; /* [31] */
        unsigned int    gicr_pendbaser_ptz : 1  ; /* [30] */
        unsigned int    rsv_16             : 14  ; /* [29:16] */
        unsigned int    gicr_pendbaser_h   : 16  ; /* [15:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PENDBASER_H;

/* Define the union U_GICR_INVR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_invlpi_pid : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_INVR_L;

/* Define the union U_GICR_INVR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_17 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_INVR_H;

/* Define the union U_GICR_INVALLR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_18 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_INVALLR_L;

/* Define the union U_GICR_INVALLR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_19 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_INVALLR_H;

/* Define the union U_GICR_SYNCR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_20          : 31  ; /* [31:1] */
        unsigned int    gicr_syncr_busy : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_SYNCR;

/* Define the union U_GICR_MOVLPIR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_movlpi_pid : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_MOVLPIR_L;

/* Define the union U_GICR_MOVLPIR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_movlpi_ta : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_MOVLPIR_H;

/* Define the union U_GICR_MOVALLR_L */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_21 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_MOVALLR_L;

/* Define the union U_GICR_MOVALLR_H */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_movall_ta : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_MOVALLR_H;

/* Define the union U_GICR_CIDR0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_cid0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CIDR0;

/* Define the union U_GICR_CIDR1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_cid1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CIDR1;

/* Define the union U_GICR_CIDR2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_cid2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CIDR2;

/* Define the union U_GICR_CIDR3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gicr_cid3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_CIDR3;

/* Define the union U_GICR_PIDR0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_22          : 24  ; /* [31:8] */
        unsigned int    gicr_devid_7to0 : 8  ; /* [7:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PIDR0;

/* Define the union U_GICR_PIDR1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_23           : 24  ; /* [31:8] */
        unsigned int    gicr_jepid_3to0  : 4  ; /* [7:4] */
        unsigned int    gicr_devid_11to8 : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PIDR1;

/* Define the union U_GICR_PIDR2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_24          : 24  ; /* [31:8] */
        unsigned int    gicr_archrev    : 4  ; /* [7:4] */
        unsigned int    gicr_usejepcode : 1  ; /* [3] */
        unsigned int    gicr_jepid_6to4 : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PIDR2;

/* Define the union U_GICR_PIDR3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_25 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PIDR3;

/* Define the union U_GICR_PIDR4 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_26                : 28  ; /* [31:4] */
        unsigned int    gicr_continuationcode : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GICR_PIDR4;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_GICR_CTLR        GICR_CTLR        ; /* 0 */
    volatile U_GICR_IIDR        GICR_IIDR        ; /* 4 */
    volatile U_GICR_TYPER_L     GICR_TYPER_L     ; /* 8 */
    volatile U_GICR_TYPER_H     GICR_TYPER_H     ; /* C */
    volatile U_GICR_STATUSR     GICR_STATUSR     ; /* 10 */
    volatile U_GICR_WAKER       GICR_WAKER       ; /* 14 */
    volatile U_GICR_SETLPIR_L   GICR_SETLPIR_L   ; /* 40 */
    volatile U_GICR_SETLPIR_H   GICR_SETLPIR_H   ; /* 44 */
    volatile U_GICR_CLRLPIRR_L  GICR_CLRLPIRR_L  ; /* 48 */
    volatile U_GICR_CLRLPIR_H   GICR_CLRLPIR_H   ; /* 4C */
    volatile U_GICR_PROPBASER_L GICR_PROPBASER_L ; /* 70 */
    volatile U_GICR_PROPBASER_H GICR_PROPBASER_H ; /* 74 */
    volatile U_GICR_PENDBASER_L GICR_PENDBASER_L ; /* 78 */
    volatile U_GICR_PENDBASER_H GICR_PENDBASER_H ; /* 7C */
    volatile U_GICR_INVR_L      GICR_INVR_L      ; /* A0 */
    volatile U_GICR_INVR_H      GICR_INVR_H      ; /* A4 */
    volatile U_GICR_INVALLR_L   GICR_INVALLR_L   ; /* B0 */
    volatile U_GICR_INVALLR_H   GICR_INVALLR_H   ; /* B4 */
    volatile U_GICR_SYNCR       GICR_SYNCR       ; /* C0 */
    volatile U_GICR_MOVLPIR_L   GICR_MOVLPIR_L   ; /* 100 */
    volatile U_GICR_MOVLPIR_H   GICR_MOVLPIR_H   ; /* 104 */
    volatile U_GICR_MOVALLR_L   GICR_MOVALLR_L   ; /* 110 */
    volatile U_GICR_MOVALLR_H   GICR_MOVALLR_H   ; /* 114 */
    volatile U_GICR_CIDR0       GICR_CIDR0       ; /* FFF0 */
    volatile U_GICR_CIDR1       GICR_CIDR1       ; /* FFF4 */
    volatile U_GICR_CIDR2       GICR_CIDR2       ; /* FFF8 */
    volatile U_GICR_CIDR3       GICR_CIDR3       ; /* FFFC */
    volatile U_GICR_PIDR0       GICR_PIDR0       ; /* FFE0 */
    volatile U_GICR_PIDR1       GICR_PIDR1       ; /* FFE4 */
    volatile U_GICR_PIDR2       GICR_PIDR2       ; /* FFE8 */
    volatile U_GICR_PIDR3       GICR_PIDR3       ; /* FFEC */
    volatile U_GICR_PIDR4       GICR_PIDR4       ; /* FFD0 */

} S_gicr_lpi_regs_REGS_TYPE;

/* Declare the struct pointor of the module gicr_lpi_regs */
extern volatile S_gicr_lpi_regs_REGS_TYPE *gopgicr_lpi_regsAllReg;

/* Declare the functions that set the member value */
int iSetGICR_CTLR_gicr_ctlr_uwp(unsigned int ugicr_ctlr_uwp);
int iSetGICR_CTLR_gicr_ctlr_dpg1(unsigned int ugicr_ctlr_dpg1);
int iSetGICR_CTLR_gicr_ctlr_dpg0(unsigned int ugicr_ctlr_dpg0);
int iSetGICR_CTLR_gicr_ctlr_rwp(unsigned int ugicr_ctlr_rwp);
int iSetGICR_CTLR_gicr_ctlr_enablelpis(unsigned int ugicr_ctlr_enablelpis);
int iSetGICR_IIDR_gicr_iidr_version(unsigned int ugicr_iidr_version);
int iSetGICR_TYPER_L_commonlpiaff(unsigned int ucommonlpiaff);
int iSetGICR_TYPER_L_gicr_typer_procnum(unsigned int ugicr_typer_procnum);
int iSetGICR_TYPER_L_gicr_typer_dpgs(unsigned int ugicr_typer_dpgs);
int iSetGICR_TYPER_L_gicr_typer_last(unsigned int ugicr_typer_last);
int iSetGICR_TYPER_L_gicr_typer_directlpi(unsigned int ugicr_typer_directlpi);
int iSetGICR_TYPER_L_gicr_typer_vlpis(unsigned int ugicr_typer_vlpis);
int iSetGICR_TYPER_L_gicr_typer_lpis(unsigned int ugicr_typer_lpis);
int iSetGICR_TYPER_H_gicr_typer_a3(unsigned int ugicr_typer_a3);
int iSetGICR_TYPER_H_gicr_typer_a2(unsigned int ugicr_typer_a2);
int iSetGICR_TYPER_H_gicr_typer_a1(unsigned int ugicr_typer_a1);
int iSetGICR_TYPER_H_gicr_typer_a0(unsigned int ugicr_typer_a0);
int iSetGICR_STATUSR_gicr_status_word(unsigned int ugicr_status_word);
int iSetGICR_STATUSR_gicr_status_rwod(unsigned int ugicr_status_rwod);
int iSetGICR_STATUSR_gicr_status_wrd(unsigned int ugicr_status_wrd);
int iSetGICR_STATUSR_gicr_status_rrd(unsigned int ugicr_status_rrd);
int iSetGICR_WAKER_gicr_waker_quiescent(unsigned int ugicr_waker_quiescent);
int iSetGICR_WAKER_gicr_waker_childrenasleep(unsigned int ugicr_waker_childrenasleep);
int iSetGICR_WAKER_gicr_waker_processorsleep(unsigned int ugicr_waker_processorsleep);
int iSetGICR_WAKER_gicr_waker_sleep(unsigned int ugicr_waker_sleep);
int iSetGICR_SETLPIR_L_gicr_setlpi_pid(unsigned int ugicr_setlpi_pid);

int iSetGICR_CLRLPIRR_L_gicr_clrlpi_pid(unsigned int ugicr_clrlpi_pid);

int iSetGICR_PROPBASER_L_gicr_probaser_l(unsigned int ugicr_probaser_l);
int iSetGICR_PROPBASER_L_gicr_proshareability(unsigned int ugicr_proshareability);
int iSetGICR_PROPBASER_L_gicr_procacheability(unsigned int ugicr_procacheability);
int iSetGICR_PROPBASER_L_gicr_proidbits(unsigned int ugicr_proidbits);
int iSetGICR_PROPBASER_H_gicr_probaser_h(unsigned int ugicr_probaser_h);
int iSetGICR_PENDBASER_L_gicr_pendbaser_l(unsigned int ugicr_pendbaser_l);
int iSetGICR_PENDBASER_L_gicr_pendshareability(unsigned int ugicr_pendshareability);
int iSetGICR_PENDBASER_L_gicr_pendcacheability(unsigned int ugicr_pendcacheability);
int iSetGICR_PENDBASER_H_gicr_pendbaser_ptz(unsigned int ugicr_pendbaser_ptz);
int iSetGICR_PENDBASER_H_gicr_pendbaser_h(unsigned int ugicr_pendbaser_h);
int iSetGICR_INVR_L_gicr_invlpi_pid(unsigned int ugicr_invlpi_pid);



int iSetGICR_SYNCR_gicr_syncr_busy(unsigned int ugicr_syncr_busy);
int iSetGICR_MOVLPIR_L_gicr_movlpi_pid(unsigned int ugicr_movlpi_pid);
int iSetGICR_MOVLPIR_H_gicr_movlpi_ta(unsigned int ugicr_movlpi_ta);

int iSetGICR_MOVALLR_H_gicr_movall_ta(unsigned int ugicr_movall_ta);
int iSetGICR_CIDR0_gicr_cid0(unsigned int ugicr_cid0);
int iSetGICR_CIDR1_gicr_cid1(unsigned int ugicr_cid1);
int iSetGICR_CIDR2_gicr_cid2(unsigned int ugicr_cid2);
int iSetGICR_CIDR3_gicr_cid3(unsigned int ugicr_cid3);
int iSetGICR_PIDR0_gicr_devid_7to0(unsigned int ugicr_devid_7to0);
int iSetGICR_PIDR1_gicr_jepid_3to0(unsigned int ugicr_jepid_3to0);
int iSetGICR_PIDR1_gicr_devid_11to8(unsigned int ugicr_devid_11to8);
int iSetGICR_PIDR2_gicr_archrev(unsigned int ugicr_archrev);
int iSetGICR_PIDR2_gicr_usejepcode(unsigned int ugicr_usejepcode);
int iSetGICR_PIDR2_gicr_jepid_6to4(unsigned int ugicr_jepid_6to4);

int iSetGICR_PIDR4_gicr_continuationcode(unsigned int ugicr_continuationcode);

#endif // __GICR_LPI_REGS_C_UNION_DEFINE_H__
